libxl: Add 'e820_host' option to config file.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 26 May 2011 13:56:37 +0000 (09:56 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 26 May 2011 13:56:37 +0000 (09:56 -0400)
commitf92337d9494efbab0918eb0e055d129fce5c3227
tree7b587e158a8a3c30f512756b82c3c116ed5252e5
parent364fab04a6cd89e68c2723c56f230fedef3dcb88
libxl: Add 'e820_host' option to config file.

.. which will be removed once the auto-ballooning of guests
with PCI devices works. During testing of the patches which provide
a host E820 in a PV guest, certain inconsistencies were found with
guests. When launching a RHEL5 or SLES11 PV guest with 4GB and a PCI device,
the kernel would report 4GB, but have 1.5G "used". What happend was that
the P2M that fall within the E820 I/O holes would never be used and was just
wasted. The mechanism to go around this is to shrink the size of the guest
before launch (say memory=2048, maxmem=4096) and then balloon back to 4096M
after start. For PVOPS type kernels it would detect the E820 I/O holes and
deflate by the correct amount but would not inflate back to 4GB.
Manually inflating makes it work.

The fix in the future for guests where the memory amount flows over the
PCI hole, is to launch the guest with decreased amount right up to the cusp
of where the E820 PCI hole starts. Also increase the 'maxmem' by the delta
and then when the guest has launched, balloon up to the delta number.

This will require some careful surgery so for right now this parameter
will guard against unsuspecting users seeing their PV guests memory "vanish."

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxl/xl_cmdimpl.c